home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / PlayTrackInfoThang.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  2.5 KB  |  75 lines  |  [TEXT/KAHL]

  1. /* PlayTrackInfoThang.h */
  2.  
  3. #ifndef Included_PlayTrackInfoThang_h
  4. #define Included_PlayTrackInfoThang_h
  5.  
  6. /* PlayTrackInfoThang module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* FixedPoint */
  12. /* BinaryCodedDecimal */
  13. /* Array */
  14. /* Memory */
  15. /* OscBankPlayer */
  16. /* TrackObject */
  17. /* IncrementalParameterUpdator */
  18. /* Fractions */
  19. /* FrameObject */
  20. /* DeterminedNoteStructure */
  21. /* NoteObject */
  22. /* ErrorDaemon */
  23.  
  24. #include "FixedPoint.h"
  25. #include "BinaryCodedDecimal.h"
  26.  
  27. struct PlayTrackInfoRec;
  28. typedef struct PlayTrackInfoRec PlayTrackInfoRec;
  29.  
  30. /* this module keeps track of all the information for playing one track. */
  31.  
  32. /* forwards */
  33. struct TrackObjectRec;
  34. struct InstrumentRec;
  35. struct FractionRec;
  36. struct TempoControlRec;
  37. struct ErrorDaemonRec;
  38.  
  39. /* this number is the number of duration update pulses that occur in every whole note. */
  40. #define DURATIONUPDATECLOCKRESOLUTION (64L*2L*3L*5L*7L)
  41.  
  42. /* dispose of cached track data structures */
  43. void                                FlushPlayTrackInfo(void);
  44.  
  45. /* create a new track play info thing and set a bunch of parameters.  this also */
  46. /* builds the internal representations for instruments & oscillators for this track. */
  47. PlayTrackInfoRec*        NewPlayTrackInfo(struct TrackObjectRec* TheTrack,
  48.                                             struct InstrumentRec* InstrumentSpecification,
  49.                                             MyBoolean StereoFlag, LargeBCDType OverallVolumeScalingReciprocal,
  50.                                             long SamplingRate, float EnvelopeRate, MyBoolean TimeInterp,
  51.                                             MyBoolean WaveInterp, struct TempoControlRec* TempoControl,
  52.                                             long ScanningGapWidthInEnvelopeTicks,
  53.                                             struct ErrorDaemonRec* ErrorDaemon);
  54.  
  55. /* dump a track play info thing and all the stuff in it */
  56. void                                DisposePlayTrackInfo(PlayTrackInfoRec* TrackInfo);
  57.  
  58. /* cue track forward to the specified point.  returns False if it fails */
  59. MyBoolean                        CuePlayTrackInfoToPoint(PlayTrackInfoRec* TrackInfo,
  60.                                             struct FractionRec* StartTime);
  61.  
  62. /* check to see if the track has finished and can be dropped. */
  63. MyBoolean                        PlayTrackIsItStillActive(PlayTrackInfoRec* TrackInfo);
  64.  
  65. /* perform one envelope clock cycle update.  if UpdateEnvelopes is true, then */
  66. /* wave data should be generated and envelopes should be updated, otherwise only */
  67. /* note scheduling should be performed. */
  68. MyBoolean                        PlayTrackUpdate(PlayTrackInfoRec* TrackInfo,
  69.                                             MyBoolean UpdateEnvelopes, long NumDurationTicks,
  70.                                             long NumFrames, largefixedsigned* OutputData,
  71.                                             float EnvelopeTicksPerDurationTick,
  72.                                             long ScanningGapFrontInEnvelopeTicks);
  73.  
  74. #endif
  75.